package com.qf.test;

import com.qf.web.Servlet.UserServlet;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @ClassName testspring
 * @Author xiao宋
 * @Date 13:57  2022/9/27
 * @Version 1.0
 * @Description TODO
 */
public class testspring {
    @Test
    public void test1( ){
        ClassPathXmlApplicationContext ac=new ClassPathXmlApplicationContext("applicationContext.xml");
        UserServlet userServlet = ac.getBean("userServlet", UserServlet.class);
        userServlet.test1();
        System.out.println(userServlet);

        UserServlet userServlet1 = ac.getBean("userServlet", UserServlet.class);
        System.out.println(userServlet1);

        ac.close();
    }


}
